package com.ruoyi.system.service.impl;

import com.ruoyi.system.domain.TbShoppingOrder;
import com.ruoyi.system.mapper.TbShoppingOrderMapper;
import com.ruoyi.system.service.ITbShoppingOrderService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 订单购物车中间Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-04-07
 */
@Service
public class TbShoppingOrderServiceImpl implements ITbShoppingOrderService 
{
    @Autowired
    private TbShoppingOrderMapper tbShoppingOrderMapper;

    /**
     * 查询订单购物车中间
     * 
     * @param id 订单购物车中间主键
     * @return 订单购物车中间
     */
    @Override
    public TbShoppingOrder selectTbShoppingOrderById(Long id)
    {
        return tbShoppingOrderMapper.selectTbShoppingOrderById(id);
    }

    /**
     * 查询订单购物车中间列表
     * 
     * @param tbShoppingOrder 订单购物车中间
     * @return 订单购物车中间
     */
    @Override
    public List<TbShoppingOrder> selectTbShoppingOrderList(TbShoppingOrder tbShoppingOrder)
    {
        return tbShoppingOrderMapper.selectTbShoppingOrderList(tbShoppingOrder);
    }

    /**
     * 新增订单购物车中间
     * 
     * @param tbShoppingOrder 订单购物车中间
     * @return 结果
     */
    @Override
    public int insertTbShoppingOrder(TbShoppingOrder tbShoppingOrder)
    {
        return tbShoppingOrderMapper.insertTbShoppingOrder(tbShoppingOrder);
    }

    /**
     * 修改订单购物车中间
     * 
     * @param tbShoppingOrder 订单购物车中间
     * @return 结果
     */
    @Override
    public int updateTbShoppingOrder(TbShoppingOrder tbShoppingOrder)
    {
        return tbShoppingOrderMapper.updateTbShoppingOrder(tbShoppingOrder);
    }

    /**
     * 批量删除订单购物车中间
     * 
     * @param ids 需要删除的订单购物车中间主键
     * @return 结果
     */
    @Override
    public int deleteTbShoppingOrderByIds(Long[] ids)
    {
        return tbShoppingOrderMapper.deleteTbShoppingOrderByIds(ids);
    }

    /**
     * 删除订单购物车中间信息
     * 
     * @param id 订单购物车中间主键
     * @return 结果
     */
    @Override
    public int deleteTbShoppingOrderById(Long id)
    {
        return tbShoppingOrderMapper.deleteTbShoppingOrderById(id);
    }
}
